/**
 * Created by huxia on 2016/12/9.
 */
var Department = require('./db')['department'];

Department.findById = function(dept_id) {
	return Department.findOne({
		where:{
			id:dept_id
		}
	});
};

/*
	通过所属科室id查找科室 */
Department.findByPid = function (p_id) {
	return Department.findAll({
		where: {
			pid: p_id
		}
	});
};

module.exports = Department;